<html>
<head><meta charset="utf-8"><title>Deps and CI · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html">Deps and CI</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212154566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212154566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212154566">(Oct 03 2020 at 05:34)</a>:</h4>
<p>Does this stream involve discussion about compiling deps and where they are cached?</p>



<a name="212154575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212154575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212154575">(Oct 03 2020 at 05:35)</a>:</h4>
<p>I think having a specific folder for compiled deps would solve most if the slowness of CI people are complaining about</p>



<a name="212154634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212154634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212154634">(Oct 03 2020 at 05:37)</a>:</h4>
<p>We do a lot of targeted <code>rm</code>s in clap CI to keep only the deps but it's still not perfect and we get "cache too big" monthly</p>



<a name="212850556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212850556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212850556">(Oct 09 2020 at 16:55)</a>:</h4>
<p>I would like to take this but I need to know if this is possible in cargo or not</p>



<a name="212855154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212855154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212855154">(Oct 09 2020 at 17:38)</a>:</h4>
<p>I am not sure exactly what you are asking for. There is already the ability to change the target folders location.  There has been a lot of work on some kind of GC for a target folder, but it still needs design work.</p>



<a name="212855288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212855288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212855288">(Oct 09 2020 at 17:39)</a>:</h4>
<p>Yeah, but it changes the whole target folder for the whole compilation. What I am asking is a separate folder for just compiling the deps</p>



<a name="212855381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212855381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212855381">(Oct 09 2020 at 17:40)</a>:</h4>
<p>You take a fresh project, and you run <code>cargo test</code>, cargo does the following steps:</p>



<a name="212855455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212855455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212855455">(Oct 09 2020 at 17:41)</a>:</h4>
<ol>
<li>Download deps</li>
<li>Compile deps</li>
<li>Compile local crates you are testing</li>
<li>Compile examples, tests</li>
</ol>



<a name="212855487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212855487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212855487">(Oct 09 2020 at 17:41)</a>:</h4>
<p>The first step can be cached using <code>~/.cargo/registry</code></p>



<a name="212855555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212855555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212855555">(Oct 09 2020 at 17:42)</a>:</h4>
<p>The second step cannot be cached currently because it's results is mixed with 3rd and 4th step results</p>



<a name="212855759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212855759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212855759">(Oct 09 2020 at 17:44)</a>:</h4>
<p>Unfortunately changing the layout of the target folder brakes libraries. The Cargo Team thinks that the libraries need to be fixed. But noone has go through to figure out how to fix each one. (and possibly add new functionality to Cargo to support the use cases.)  Let me see if I can find you some links.</p>



<a name="212856891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212856891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212856891">(Oct 09 2020 at 17:55)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/pull/6668">https://github.com/rust-lang/cargo/pull/6668</a> ... but you already commented there. <br>
I think the next steps are updating <span class="user-mention" data-user-id="120518">@Eric Huss</span>'s list at (<a href="https://github.com/rust-lang/cargo/pull/6668#issuecomment-467210422">https://github.com/rust-lang/cargo/pull/6668#issuecomment-467210422</a>) and trying to figure out how to fix each project. But Eric may have more advice on how to get this moving.</p>



<a name="212857675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212857675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212857675">(Oct 09 2020 at 18:02)</a>:</h4>
<p>Oof. It was so long ago I already forgot that this existed. Sorry. Thanks <span class="user-mention" data-user-id="120179">@Eh2406</span></p>



<a name="212857772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212857772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212857772">(Oct 09 2020 at 18:02)</a>:</h4>
<p>But yeah, I will try to take this issue if possible and get it done. (I also want to take other issues but they are waiting for some feedback from <span class="user-mention" data-user-id="120518">@Eric Huss</span> )</p>



<a name="212858018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Deps%20and%20CI/near/212858018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Deps.20and.20CI.html#212858018">(Oct 09 2020 at 18:05)</a>:</h4>
<p>Well he has bean doing a great job helping with all the things, and is now beread under all the foloup.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>